﻿requirejs.config({
    baseUrl: ".",
    paths: {
    	zepto:"javascripts/zepto.min",
    	dingtalk:"javascripts/dingtalk",
        vue: "components/vue/vue.min",
        axios: "components/axios/axios.min",
        common: "resources/js/common"
    }
});

require(["zepto","dingtalk","vue", "axios", "common"], function (zepto,dingtalk,Vue, axios, common) {
    var vm = new Vue({
        el: "#view",
        data: {
            result: []
        },
        mounted: function () {
            var self = this;

            var status = common.getParam("status");
            axios.get("/change/listByStatus?status=" + status)
                .then(function (response) {
                    self.result = response.data;
                    if (self.result.length == 0) {
                        common.goback();
                    }
                });
        },
        methods: {
            gotoDetail: function (id) {
                window.location.href = "changeDetail.html?id=" + id;
            }
        }
    });

});